#set( $page_title = "红包列表" )
<div>
    <div style="font-size: 24px; color: #333333;">红包列表</div>
    <div style="border-top: 1px solid #e7e7e7; margin-top: 20px;"></div>
    <div style="margin-top: 20px;">
         <form action="$!{velocityCommonUtil.getAbsoluteURL()}/hongbao/list.html" id="listForm" method="post">
             <div>
                 <span style="color: #747474;">名称：</span><input type="text" name="nameLike"  value="$!{query.nameLike}"   style="width: 180px;">
                 <span style="color: #747474;">商户：</span>
                 <input type="hidden" id="shopId" name="sellerShopId"  value="$!{query.sellerShopId}"   >
                 <input type="text" id="shopName" name="shopName"  value="$!{query.shopName}"   style="width: 180px;" readonly="true" placeholder="请点击选择">
                 <input type="button" id="btnQueryShop" value="选择" class="btn btn-primary"  style="height: 30px; width: 40px;">
                 <span style="color: #747474;">状态：</span>
                 <select name="status">
                     <option value="" >所有</option>
                     #foreach($item in $!statusList)
                     <option value="$!item.code" #if($!item.code == $!{query.status})selected="true"#end>$!item.description</option>
                     #end
                 </select>
             </div>

             <div style="padding-top: 15px">
                 <span style="color: #747474;">修改状态：</span>
                 <select name="auditStatus">
                     <option value="" >所有</option>
                     #foreach($item in $!auditStatusList)
                     <option value="$!item.code" #if($!item.code == $!{query.auditStatus})selected="true"#end>$!item.description</option>
                     #end
                 </select>
                 <input type="submit" id="btnSearch" class="btn   btn-danger"  value="搜索" style="height: 30px; width: 60px;" />&nbsp;&nbsp;&nbsp;
                 <input type="submit" id="btnClear" class="btn   btn-danger"  value="清空" style="height: 30px; width: 60px;" />
             </div>
                </form>
    </div>
    <div style="margin-top: 20px;">
        <table class="table" cellPadding="0" cellSpacing="0" style="width: 100%;">
            <thead style="font-size: 14px;">
                <tr>
                    <th style="width: 6%;">名称</th>
                    <th style="width: 8%;">创建时间</th>
                    <th style="width: 8%;">到期时间</th>
                    <th style="width: 5%;">商户</th>
                    <th style="width: 5%;">代理商</th>
                    <th style="width: 5%;">图片</th>
                    <th style="width: 4%;">价值(元)</th>
                    <th style="width: 4%;">价格(元)</th>
                    <th style="width: 3%;">数量</th>
                    <th style="width: 3%;">剩余数量</th>
                    <th style="width: 5%;">状态</th>
                    <th style="width: 5%;">修改状态</th>
                    <th style="width: 8%;">操作</th>
                </tr>
            </thead>
          <tbody  style="font-size: 12px;">
               #foreach ($item in $!dataList)
                <tr>
                    <td >$!item.name</td>
                    <td >$!date.format('yyyy-MM-dd HH:mm',$!item.createdAt)</td>
                    <td >$!date.format('yyyy-MM-dd HH:mm',$!item.endTime)</td>
                    <td >$!item.shop.name</td>
                    <td >$!item.areaUser.userName</td>
                    <td><img src="$!item.img" style="width: 90px;height: 65px;"/></td>
                    <td >$!velocityCommonUtil.fen2Yuan($!item.cost)</td>
                    <td >$!velocityCommonUtil.fen2Yuan($!item.price)</td>
                    <td >$!item.num</td>
                    <td >$!item.remainNum</td>
                    <td >$!item.hongbaoStatus.description</td>
                    <td >$!item.hongbaoAuditStatus.description</td>
                    <td>
                        <a href="javascript:void(0)" id="enterEdit" data-id="$!item.id">修改</a>
                        <a href="javascript:void(0)" id="offShelves" data-id="$!item.id">下架</a>
                    </td>
                </tr>
                #end
            </tbody>
        </table>
        
         <div  align="right">
                $velocityCommonUtil.pageInfo($!pageInfo)
         </div>
         
    </div>
</div>
<script type="text/javascript" src="$!{velocityCommonUtil.getAbsoluteURL()}/_resources/js/module/hongbao.js"></script>





